using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.RepositoryFactory.CodeGeneration.ObjectModel.Mappings.Enums;

namespace Microsoft.Practices.RepositoryFactory.CodeGeneration.ObjectModel.Mappings
{
    /// <summary/>
    public class EntityStoredProcedureMapping
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:EntityStoredProcedureMapping"/> class.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="procedure">The procedure.</param>
        public EntityStoredProcedureMapping(string procedure, bool procedureHasInputParameters, string operationName, OperationType operationType)
        {
            this.procedure = procedure;
            this.procedureHasInputParameters = procedureHasInputParameters;
            this.operationName = operationName;
            this.operationType = operationType;
        }

        private string procedure;

        /// <summary>
        /// Gets or sets the procedure.
        /// </summary>
        /// <value>The procedure.</value>
        public string Procedure
        {
            get { return procedure; }
            set { procedure = value; }
        }

        private bool procedureHasInputParameters;

        /// <summary>
        /// Gets or sets a value indicating whether [procedure has input parameters].
        /// </summary>
        /// <value>
        /// 	<c>true</c> if [procedure has input parameters]; otherwise, <c>false</c>.
        /// </value>
        public bool ProcedureHasInputParameters
        {
            get { return procedureHasInputParameters; }
            set { procedureHasInputParameters = value; }
        }

        private string operationName;

        /// <summary>
        /// Gets or sets the name of the operation.
        /// </summary>
        /// <value>The name of the operation.</value>
        public string OperationName
        {
            get { return operationName; }
            set { operationName = value; }
        }

        private OperationType operationType;

        /// <summary>
        /// Gets or sets the type of the operation.
        /// </summary>
        /// <value>The type of the operation.</value>
        public OperationType OperationType
        {
            get { return operationType; }
            set { operationType = value; }
        }

        private List<PropertyParameterMapping> parameterMappings = new List<PropertyParameterMapping>();

        /// <summary>
        /// Gets or sets the parameter mappings.
        /// </summary>
        /// <value>The parameter mappings.</value>
        public List<PropertyParameterMapping> ParameterMappings
        {
            get { return parameterMappings; }
            set { parameterMappings = value; }
        }

        private Identity identity = new Identity();

        /// <summary>
        /// Gets or sets the identity.
        /// </summary>
        /// <value>The identity.</value>
        public Identity Identity
        {
            get { return identity; }
            set { identity = value; }
        }
    }
}
